#!/usr/bin/env python
import sys
import class_set
import helper

class SumMapper(helper.MapperHelper):
    def mapper(self):
        for line in sys.stdin:
            key, value = self.loader(line)
            left, right = self.split(key)
            recom_tag = class_set.RecomTag('')
            recom_tag.init(value)
            self.allocator(self.join(left, recom_tag.getType()), self.join(right, recom_tag))


def main():
    sm = SumMapper()
    sm.mapper()

if __name__ == '__main__':
    main()
